<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org">
<head th:include="shared/css_js::header">
	<title>jQuery WeUI</title>
	<link rel="stylesheet" type="text/css" href="/static/css/weuicss/weui.min.css"/>
</head>

<body>

<header class="mui-bar mui-bar-nav">
	<a class="mui-action-back mui-icon mui-icon-left-nav mui-pull-left"></a>
	<h1 class="mui-title"><font size="4"><b>我的行驶证</b></font></h1>
</header>

<div class="mui-content">
		<div class="weui-cells weui-cell_access" style="margin-top: 0px">
			<div class="weui-cell" style="line-height:2">
				<div class="weui-cell__hd"><i class="fa fa-handshake-o fa-lg" style="color: black;padding-top: 5px"></i>&nbsp;&nbsp;</div>
				<div class="weui-cell__bd">
					<h4 style="margin-bottom: 0px">行驶证详情</h4>
				</div>
			</div>
		</div>
     	<input th:id="custcarid" type="hidden" th:value="${custcarid}"/>
	    <input th:id="setdefault" type="hidden" th:value="${setdefault}"/>
		<ul class="mui-table-view">
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >车主</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="owner" th:value="${owner}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >车牌号</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="plate_num" th:value="${plate_num}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >车品牌</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="model" th:value="${model}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >VIN</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="vin" th:value="${vin}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >发动机号</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="engine_num" th:value="${engine_num}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >注册日期</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="register_date" th:value="${register_date}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li class="mui-table-view-cell mui-media" style="line-height: 2">
				<a href="#" >
					<div class="weui-flex">
						<div class="weui-flex__item" >
							<div class="mui-media-body" style="white-space: normal">
								<p >发证日期</p>
							</div>
						</div>
						<div class="weui-flex__item" >
							<h4><input th:id="issue_date" th:value="${issue_date}" style="border: 0px"/></h4>
						</div>
					</div>
				</a>
			</li>
			<li  style="line-height: 1">
				<a id="ajaxBtn" class="weui-btn weui-cell_primary"   style="background-color: #04be02;">确定</a>
			</li>
		</ul>
</div>

</body>
<script>
    $(function() {
        //ajax提交
        $("#ajaxBtn").click(function() {
            $.ajax( {
                type : "POST",
                url : "/person/saveocrcarinfo",
                data:{
                    owner:$("#owner").val(),
                    plate_num:$("#plate_num").val(),
                    model:$("#model").val(),
                    vin:$("#vin").val(),
                    engine_num:$("#engine_num").val(),
                    register_date:$("#register_date").val(),
                    issue_date:$("#issue_date").val(),
                    custcarid:$("#custcarid").val(),
			        setdefault:$("#setdefault").val()
                },
                success : function(msg) {
                    location.href="/person/carhome";
                }
            });
        })
    })
</script>
</html>
